const http = require("http");
const fs = require("fs");
const url = require("url");

http.createServer(function(req,res){
	
	let path = url.parse(req.url,true).pathname;
	
	if(path == "/a"){
		
		fs.readFile("./index.html",function(err,data){
			
			res.write(data);
			res.end();
			
		})
		
	}else if(path == "/b"){
		
		fs.readFile("./FenLei.html",function(err,data){
			
			res.write(data);
			res.end();
			
		})
		
	}else if(path == "/c"){
		
		fs.readFile("./My.html",function(err,data){
			
			res.write(data);
			res.end();
			
		})
		
	}else{
		
		fs.readFile("./404.html",function(err,data){
			
			res.write(data);
			res.end();
			
		})
		
	}
	
}).listen(43009,function(){
	console.log("server start");
})
